package com.xj0927.cloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: xj0927
 * @Description:
 * @Date Created in 2020-10-30 17:40
 * @Modified By:
 */
@RestController
@RefreshScope  //增加刷新注解：增加刷新能力
public class ConfigController {
    @Value("${config.info}")
    private String configInfo;

    @GetMapping("/configInfo1")
    public String getConfigInfo(){
        return configInfo;
    }
}
